package Code.Objects.Effects.Lasers.Player;

import org.jrabbit.standard.game.graphics.skins.animation.AnimatedSkin;

import Code.Basic.Entity.GenericCharacter;
import Code.Objects.Effects.Lasers.Laser;

public class PlayerLaser extends Laser
{
	private float damage;

	public PlayerLaser(String filepath, float dps)
	{
		super(filepath);
		damage = dps / 60;
		targetsAllowed[1] = false;
	}

	public PlayerLaser(AnimatedSkin skin, float dps)
	{
		super(skin);
		damage = dps / 60;
	}
	
	public void setDamage(float dps)
	{
		damage = dps / 60;
	}

	public void affect(GenericCharacter gC)
	{
		if(gC.getFaction() != 1)
		{
			gC.damage(damage, 1);
			tip.burst(gC.location());
		}
	}
}
